import pickle


def load_models(norm_res_path='models/norm_res.pkl',
                min_max_scaler_path='models/min_max_scaler.pkl',
                gradient_boost_path='models/gradient_boost_regressor.pkl'):
    with open(norm_res_path, "rb") as f:
        norm_res = pickle.load(f)
    with open(min_max_scaler_path, "rb") as f:
        min_max_scaler = pickle.load(f)
    with open(gradient_boost_path, "rb") as f:
        gradient_boost = pickle.load(f)

    return norm_res, min_max_scaler, gradient_boost


def predict(x_norm_min_max, gradient_boost):
    tensile_strength = gradient_boost.predict(x_norm_min_max)
    return tensile_strength
